def sum_num(num):
    # 出口
    if num == 1:
        return 1
    # 假设sum_num能够正确处理1...num-1
    temp = sum_num(num-1)
    return num + temp

result = sum_num(100)   
print(result)